<script setup>
import { ref } from "vue";
const props = defineProps(["b","addb"]);
const a = ref(0);
const add = () => {
  a.value++;
};
</script>

<template>
  <button @click="addb">增加</button>
  <span>{{ a }}</span>
  <span>{{ b }}</span>
</template>

<style scoped></style>
